import Vue from "vue";
import Vuex from "vuex";
import state from "@/store/data/state";
Vue.use(Vuex);
import mutations from "@/store/data/mutations";
const store = new Vuex.Store({
  state: {
    ...state.state
  },
  //getters可以认为是store的计算属性
  getters: {
    ...state.getters
  },
  mutations: {
    // 同步函数
    ...mutations.sync
  },
  actions: {
    //异步函数
    ...mutations.async
  }
});
export default store;
